<!doctype html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>js示例4-12-7</title>
	<script>
		
		
	</script>
</head>
<body>
	输入文本：<input type="text" onchange="toUpper()" id="change">
	<script>
	    function toUpper() {
	        var change = document.getElementById("change");
	        change.value = change.value.toUpperCase();
	    }
	</script>
</body>
</html>